Optimal. Leaf size=99 \[ -\frac {a^3 (i A+B) (1+i \tan (e+f x))^3}{8 c^4 f (1-i \tan (e+f x))^4}-\frac {a^3 (i A-7 B) (1+i \tan (e+f x))^3}{48 c^4 f (1-i \tan (e+f x))^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 99, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.073, Rules used = {3669, 79, 37}
\begin {gather*} -\frac {a^3 (-7 B+i A) (1+i \tan (e+f x))^3}{48 c^4 f (1-i \tan (e+f x))^3}-\frac {a^3 (B+i A) (1+i \tan (e+f x))^3}{8 c^4 f (1-i \tan (e+f x))^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 37
Rule 79
Rule 3669
Rubi steps
\begin {align*} \int \frac {(a+i a \tan (e+f x))^3 (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^4} \, dx &=\frac {(a c) \text {Subst}\left (\int \frac {(a+i a x)^2 (A+B x)}{(c-i c x)^5} \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac {a^3 (i A+B) (1+i \tan (e+f x))^3}{8 c^4 f (1-i \tan (e+f x))^4}+\frac {(a (A+7 i B)) \text {Subst}\left (\int \frac {(a+i a x)^2}{(c-i c x)^4} \, dx,x,\tan (e+f x)\right )}{8 f}\\ &=-\frac {a^3 (i A+B) (1+i \tan (e+f x))^3}{8 c^4 f (1-i \tan (e+f x))^4}-\frac {a^3 (i A-7 B) (1+i \tan (e+f x))^3}{48 c^4 f (1-i \tan (e+f x))^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.21, size = 81, normalized size = 0.82 \begin {gather*} \frac {a^3 ((-7 i A+B) \cos (e+f x)-(A+7 i B) \sin (e+f x)) (\cos (7 e+10 f x)+i \sin (7 e+10 f x))}{48 c^4 f (\cos (f x)+i \sin (f x))^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.34, size = 90, normalized size = 0.91
method | result | size |
risch | \(-\frac {a^{3} {\mathrm e}^{8 i \left (f x +e \right )} B}{16 c^{4} f}-\frac {i a^{3} {\mathrm e}^{8 i \left (f x +e \right )} A}{16 c^{4} f}+\frac {a^{3} {\mathrm e}^{6 i \left (f x +e \right )} B}{12 c^{4} f}-\frac {i a^{3} {\mathrm e}^{6 i \left (f x +e \right )} A}{12 c^{4} f}\) | \(88\) |
derivativedivides | \(\frac {a^{3} \left (-\frac {-i A -5 B}{2 \left (i+\tan \left (f x +e \right )\right )^{2}}-\frac {4 i A +4 B}{4 \left (i+\tan \left (f x +e \right )\right )^{4}}-\frac {8 i B -4 A}{3 \left (i+\tan \left (f x +e \right )\right )^{3}}+\frac {i B}{i+\tan \left (f x +e \right )}\right )}{f \,c^{4}}\) | \(90\) |
default | \(\frac {a^{3} \left (-\frac {-i A -5 B}{2 \left (i+\tan \left (f x +e \right )\right )^{2}}-\frac {4 i A +4 B}{4 \left (i+\tan \left (f x +e \right )\right )^{4}}-\frac {8 i B -4 A}{3 \left (i+\tan \left (f x +e \right )\right )^{3}}+\frac {i B}{i+\tan \left (f x +e \right )}\right )}{f \,c^{4}}\) | \(90\) |
norman | \(\frac {\frac {A \,a^{3} \tan \left (f x +e \right )}{c f}+\frac {i B \,a^{3} \left (\tan ^{7}\left (f x +e \right )\right )}{c f}+\frac {-i A \,a^{3}+B \,a^{3}}{6 c f}+\frac {\left (i A \,a^{3}+7 B \,a^{3}\right ) \left (\tan ^{6}\left (f x +e \right )\right )}{2 c f}+\frac {\left (17 i A \,a^{3}+7 B \,a^{3}\right ) \left (\tan ^{2}\left (f x +e \right )\right )}{6 c f}+\frac {7 \left (-2 i B \,a^{3}+A \,a^{3}\right ) \left (\tan ^{5}\left (f x +e \right )\right )}{3 c f}-\frac {7 \left (-i B \,a^{3}+2 A \,a^{3}\right ) \left (\tan ^{3}\left (f x +e \right )\right )}{3 c f}-\frac {\left (9 i A \,a^{3}+7 B \,a^{3}\right ) \left (\tan ^{4}\left (f x +e \right )\right )}{2 c f}}{\left (1+\tan ^{2}\left (f x +e \right )\right )^{4} c^{3}}\) | \(226\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.96, size = 51, normalized size = 0.52 \begin {gather*} -\frac {3 \, {\left (i \, A + B\right )} a^{3} e^{\left (8 i \, f x + 8 i \, e\right )} + 4 \, {\left (i \, A - B\right )} a^{3} e^{\left (6 i \, f x + 6 i \, e\right )}}{48 \, c^{4} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 167 vs. \(2 (80) = 160\).
time = 0.43, size = 167, normalized size = 1.69 \begin {gather*} \begin {cases} \frac {\left (- 16 i A a^{3} c^{4} f e^{6 i e} + 16 B a^{3} c^{4} f e^{6 i e}\right ) e^{6 i f x} + \left (- 12 i A a^{3} c^{4} f e^{8 i e} - 12 B a^{3} c^{4} f e^{8 i e}\right ) e^{8 i f x}}{192 c^{8} f^{2}} & \text {for}\: c^{8} f^{2} \neq 0 \\\frac {x \left (A a^{3} e^{8 i e} + A a^{3} e^{6 i e} - i B a^{3} e^{8 i e} + i B a^{3} e^{6 i e}\right )}{2 c^{4}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 237 vs. \(2 (87) = 174\).
time = 1.15, size = 237, normalized size = 2.39 \begin {gather*} -\frac {2 \, {\left (3 \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} + 3 i \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} - 3 \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} - 17 \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 4 i \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 10 i \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + 10 \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + 17 \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 4 i \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 3 i \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 3 \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 3 \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{3 \, c^{4} f {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i\right )}^{8}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 8.93, size = 118, normalized size = 1.19 \begin {gather*} \frac {-\frac {a^3\,\left (-B+A\,1{}\mathrm {i}\right )}{6}+\frac {a^3\,\mathrm {tan}\left (e+f\,x\right )\,\left (2\,A-B\,4{}\mathrm {i}\right )}{6}+B\,a^3\,{\mathrm {tan}\left (e+f\,x\right )}^3\,1{}\mathrm {i}+\frac {a^3\,{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (-3\,B+A\,3{}\mathrm {i}\right )}{6}}{c^4\,f\,\left ({\mathrm {tan}\left (e+f\,x\right )}^4+{\mathrm {tan}\left (e+f\,x\right )}^3\,4{}\mathrm {i}-6\,{\mathrm {tan}\left (e+f\,x\right )}^2-\mathrm {tan}\left (e+f\,x\right )\,4{}\mathrm {i}+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________